package com.luban;

import com.luban.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.FileInputStream;
import java.util.BitSet;

public class Test {

	int a;
	String b;
	Integer aa;
	public static void main(String[] args) {
/*
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);

		UserService userService = applicationContext.getBean("userService", UserService.class);

		userService.test();*/

		System.out.println(1&0);
		System.out.println(-1&1);

		BitSet bitSet = new BitSet();
		bitSet.set(1);

		System.out.println(129>>6);//2

		System.out.println("====================================================");
		for (int i = 1; i <= 111; i++) {

			System.out.println("1 左移"+i+"位后" + (1L << i));

		}
		/**
		 *  3 = 00000011
		 *  4 = 00000100
		 *
 		 */

		System.out.println( true && false);




	}
}


 class WhichChars{
	private BitSet used = new BitSet();
	public WhichChars(String str){
		for(int i=0;i< str.length();i++) {
			char bitIndex = str.charAt(i);



			used.set(bitIndex);  // set bit for char
		}
	}
	public String toString(){
		String desc="[";
		int size=used.size();
		for(int i=0;i< size;i++){
			if(used.get(i))
				desc+=(char)i;
		}
		return desc+"]";
	}
	public static void main(String args[]){
		WhichChars w=new WhichChars("How do you do 你好 号好");
		System.out.println(w);
	}
}
